import { IJobs, IJobItem, ITasks, ITaskItem } from "@/components/Project/index";

export const PendingJobStore = {
  namespaced: true,
  state: {
    jobs: null,
    selectedJob: null,
    tasks: null,
    selectedTask: null,
  },
  mutations: {
    setJobs(state: { jobs: IJobs | null }, jobs: IJobs | null) {
      state.jobs = jobs;
    },
    setSelectedJob(
      state: { selectedJob: IJobItem | null },
      selectedJob: IJobItem | null
    ) {
      state.selectedJob = selectedJob;
    },
    setTasks(state: { tasks: ITasks | null }, tasks: ITasks | null) {
      state.tasks = tasks;
    },
    setSelectedTask(
      state: { selectedTask: ITaskItem | null },
      selectedTask: ITaskItem | null
    ) {
      state.selectedTask = selectedTask;
    },
  },
  actions: {},
};
